#ifndef DBQUERY_H
#define DBQUERY_H

#include <QObject>
#include "db_client.h"
#include <QMap>
class DBQuery : public QObject
{
    Q_OBJECT
public:
    explicit DBQuery(QObject *parent = nullptr);
    bool init(QString ip,QString port,QString user,QString pwd);
    //bool selectQuery(QString sql);
    QList<DeptNode> selectDeptQuery(QString sql);
    QMap<QString,QString> selectLoginQuery(QString sql);
     QList<QList<QString>> select(QString sql);
    bool insertQuery();
    bool deleteQuery();
    bool updateQuery();

    QSqlDatabase getDataDBClient();
signals:

public slots:

private:
    DBClient *dbClient;
    DBClient *dataDbClient;
};

#endif // DBQUERY_H
